<?php
namespace Common\Controller;
use Think\Controller;
use Org\Util\Rbac;

class CommonController extends BaseController {
    public function _initialize(){ 
		parent::_initialize();
		$LG_USER = session('LG_USER');
		if (empty($LG_USER)){
           $this->error('请重新登录', U('/Public/login')); 
        }
        $access = Rbac::AccessDecision(); 
        if(!$access){
            $this->error('你没有权限');
        }
		$this->assign('LG_USER',session('LG_USER')); 
    }
	
}